//
//  ViewController.m
//  Puzzle_Crazy
//
//  Created by Le Hung on 3/29/14.
//  Copyright (c) 2014 DanielLe. All rights reserved.
//

#import "ViewController.h"
#import "UIButton+Block.h"
#import "OwnImageViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self customButton];
}

- (void)customButton
{
    [self.btnOwnImage setEnabled:YES];
    [self.btnOwnImage addAction:^(UIButton *btn) {
        UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil];
        OwnImageViewController *puzzleView = (OwnImageViewController*)[storyboard instantiateViewControllerWithIdentifier:@"OwnImageViewController"];
        [puzzleView setModalPresentationStyle:UIModalPresentationCustom];
        puzzleView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
        [self presentViewController:puzzleView animated:YES completion:nil];
    } forControlEvents:UIControlEventTouchUpInside];
    
    [self.btnInstruction addAction:^(UIButton *btn) {
        //instruction
    } forControlEvents:UIControlEventTouchUpInside];
    
    [self.btnMoreGame addAction:^(UIButton *btn) {
        //more game
    } forControlEvents:UIControlEventTouchUpInside];
    
    [self.btnFullVersion addAction:^(UIButton *btn) {
        // full version
    } forControlEvents:UIControlEventTouchUpInside];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    self.navigationController.navigationBarHidden = YES;
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    
}

@end
